import { request } from 'umi';
import { createCRUD } from '@/utils/api';

const route = '/ide_registry';

const crud = createCRUD<RegistryEntity>(route);

export { crud };

export async function getRegistry(id: string) {
  return await request<RegistryEntity>(`${route}/get_entity?id=${id}`, {
    method: 'GET',
  });
}

export async function getRegistryOptions() {
  return await request<[]>(`${route}/get_registry_options`, {
    method: 'GET',
  });
}
